/*
--------------------------------------------------------------------------------
				Ak-Lib. 
			 Project       	: Ak-Lib
			 Group         	: Ak-Lib R&D Team
			 Author        	: Ocean.Wang
			 Create Date 	: 05-01-2010
--------------------------------------------------------------------------------
Code Name 	:  A.K 	~v~
Description	:  Yet Another Cross-Platform Lib.
Cautions    	:
--------------------------------------------------------------------------------
Change History:
Version		: 0.1
Building 		: 05/01/10
10-05.01 first draft, build, debug and test.
--------------------------------------------------------------------------------
*/

#ifndef _INC_AK_CLK_
#define	_INC_AK_CLK_

#include "ak_types.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Linux */
#if 	_TARGET_OS == _OS_GNU
typedef union {  
	struct {    
		long LowPart;    
		long HighPart;  
	}u;  
	unsigned long long QuadPart;
} _t_timestamp;

/* Windows */
#elif 	_TARGET_OS == _OS_WIN

typedef LARGE_INTEGER	_t_timestamp;
#endif

/* Resolution of the Clock Lib */
#define _FREQ_MS_SCLK 		5
#define _FREQ_MS_STRIG 		50

extern	void 	SClk_LibInit(void);
extern	int 	STrigger_Add(_t_cbentry * pEntry);
extern	int 	STrigger_Del(_t_cbentry * pEntry);
extern	int 	SClk_Add(_t_cbentry * pEntry);
extern	int 	SClk_Del(_t_cbentry * pEntry);

/* Get Current Tick */
extern	int		STs_GetTick(void);


#ifdef __cplusplus
}
#endif

#endif



